<!--#include virtual="/dzps/easyasp/easp.asp"-->
<!DOCTYPE html>
<html>
<head>
  <title></title>
<%
Easp.NoCache
easp.include "h.asp"
%>
<link rel="stylesheet" href="../layuiadmin/style/login.css" media="all">
</head>
<body>
<%
	dim rs,i,MyArray
	easp.var("website") = easp.db.sel("select name2 from [baseinfo] where [name1]='网站名称'")("name2")
	easp.var("webtitle") = easp.db.sel("select name2 from [baseinfo] where [name1]='网站标题'")("name2")
%>
<!--下面2行为了隐藏360自动填充用户名和密码表单-->
　　<input type="text" id="aaa" style="opacity: 0; height: 0" />   
　　<input type="password" id="aba" style="opacity: 0; height: 0" />

  <div class="layadmin-user-login layadmin-user-display-show" id="LAY-user-login" style="display: none;">
    <div class="layadmin-user-login-main">
      <div class="layadmin-user-login-box layadmin-user-login-header">
        <h2><%=easp.var("webtitle")%></h2>
        <p><%=easp.var("website")%></p>
      </div>
	  
      <div class="layadmin-user-login-box layadmin-user-login-body layui-form">
        <div class="layui-form-item">
          <label class="layadmin-user-login-icon layui-icon layui-icon-cellphone" for="LAY-user-login-cellphone"></label>
          <input type="text" name="username" id="LAY-user-login-username" lay-verify="required" placeholder="用户名" class="layui-input">
        </div>

        <div class="layui-form-item">
          <label class="layadmin-user-login-icon layui-icon layui-icon-password" for="LAY-user-login-password"></label>
          <input type="password" name="password" id="LAY-user-login-password" lay-verify="pass" placeholder="密码" class="layui-input">
        </div>
		<div class="layui-form-item">
          <label class="layadmin-user-login-icon layui-icon layui-icon-password" for="LAY-user-login-repass"></label>
          <input type="password" name="repass" id="LAY-user-login-repass" lay-verify="required" placeholder="确认密码" class="layui-input">
        </div>

        <div class="layui-form-item">
          <input type="checkbox" name="agreement" lay-skin="primary" title="同意会员权益书" checked>
        </div>
        <div class="layui-form-item">
          <button class="layui-btn layui-btn-fluid" lay-submit lay-filter="LAY-user-reg-submit" id="LAY-user-reg-submit">注 册</button>
        </div>
      </div>
    </div>
    
    <div class="layui-trans layadmin-user-login-footer">
      
      <p>© 2018 <a href="http://www.layui.com/" target="_blank">xx.com</a></p>
      <p>
        <span><a href="http://www" target="_blank">获取授权</a></span>
        <span><a href="http://www" target="_blank">在线演示</a></span>
        <span><a href="http://www" target="_blank">前往官网</a></span>
      </p>
    </div>
  </div>

  <script src="../layuiadmin/layui/layui.js"></script>  
  <script>
  layui.config({
    base: '../layuiadmin/' //静态资源所在路径
  }).extend({
    index: 'lib/index' //主入口模块
  }).use(['index', 'user'], function(){
    var $ = layui.$
    ,setter = layui.setter
    ,admin = layui.admin
    ,form = layui.form
    ,router = layui.router();

    form.render();
layer.alert('欢迎您！', {
	skin: 'layui-layer-molv' 
  ,closeBtn: 0,time: 0
  ,title:'湖南恒天'
});
	
    form.on('submit(LAY-user-reg-submit)', function(obj){
      var field = obj.field;
      
      if(field.password !== field.repass){
        return layer.msg('两次密码输入不一致');
      }
      
      if(!field.agreement){
        return layer.msg('你必须同意用户协议才能注册');
      }
      
      admin.req({
        url: layui.setter.base + 'lib/reg.asp?action=userReg' 
        ,data: field
        ,done: function(res){
			if(res.msg=='成功'){
				layer.msg(res.msg, {
				offset: '15px'
				,icon: 1
				,time: 1000
			  }, function(){
				location.href = 'login.asp'; 
			  });	
			}else{
				layer.msg(res.msg, {
				offset: '15px'
				,icon: 1
				,time: 1000
			  }, function(){
				//location.href = 'login.asp'; //跳转到登入页
			  });			
			}
        }
      });
      
      return false;
    });
  });
  </script>
</body>
</html>